package mtb

import (
        "cftgo/cftf/meta"
)

type LoginCluster struct {
        instance_id int32
        http_listen_port int32

        _flags1_ uint64
        _flags2_ uint64
}

func (this *LoginCluster) GetInstanceId() int32 {
        return this.instance_id
}

func (this *LoginCluster) HasInstanceId() bool {
        return (this._flags1_ & (uint64(1) << 1)) > 0
}

func (this *LoginCluster) GetHttpListenPort() int32 {
        return this.http_listen_port
}

func (this *LoginCluster) HasHttpListenPort() bool {
        return (this._flags1_ & (uint64(1) << 3)) > 0
}


func (this *LoginCluster) LoadFromKv(kv map[string]interface{}) {
        meta.ReadMetaTableField(&this.instance_id, "instance_id", &this._flags1_, 1, kv)
        meta.ReadMetaTableField(&this.http_listen_port, "http_listen_port", &this._flags1_, 3, kv)
}
